﻿using System;

namespace System.Web.Core
{
    public class Role : Entity
    {
        private Property<string> name = new Property<string>();
        private Property<string> description = new Property<string>();
        private Property<long> roleType = new Property<long>();

        public Property<string> Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }
        public Property<string> Description
        {
            get
            {
                return description;
            }
            set
            {
                description = value;
            }
        }
        public Property<long> RoleType
        {
            get
            {
                return roleType;
            }
            set
            {
                roleType = value;
            }
        }

        public bool IsRoleType(long roleType)
        {

            return (RoleType.Value & Convert.ToInt64(roleType.ToString(), 16)) == Convert.ToInt64(roleType.ToString(), 16);
        }
    }
}